package cn.gson.school.controller.xitong;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.gson.school.dao.xitong.RoleSerchDao;
import cn.gson.school.dao.xitong.UserDao;
import cn.gson.school.dao.xitong.UserInfoDao;
import cn.gson.school.entity.xitong.RoleEntity;
import cn.gson.school.mappers.xitong.EmpMapper;
import cn.gson.school.mappers.xitong.RoleSerchMapper;
import cn.gson.school.mappers.xitong.UserMapper;
import cn.gson.school.service.xitong.EmpService;

/**
 * 系统模块
 * 
 * @author lc
 *
 */
@SuppressWarnings("unused")
@Controller
@RequestMapping("/xitong")
public class XiTongController {

	@Autowired
	private UserMapper userMapper;
	@Autowired
	private EmpMapper empMapper;
	@Autowired
	private RoleSerchMapper roleSerchMapper;
	@Autowired
	private EmpService empService;
	

	@RequestMapping("/xt-dept-list")
	public void deptList() {

	}

	@RequestMapping("/xt-log")
	public void logList() {

	}

	@RequestMapping("/xt-role-list")
	public void role() {

	}

	@RequestMapping("/xt-user-list")
	public String userList(Model model) {

		// 角色下拉框的值
		List<RoleEntity> rolelist = userMapper.roleList();
		System.out.println(rolelist);
		model.addAttribute("rolelist", rolelist);
		return "xitong/xt-user-list";

	}

	@RequestMapping("/xt-emp-list")
	public void empList() {

	}

	@RequestMapping("/xt-userinfo")
	public void userInfo() {

	}

	@RequestMapping("/xt-editpass")
	public void editPass() {

	}

	@RequestMapping("/xt-add-dept")
	public void addDept() {

	}

	@RequestMapping("/xt-add-user")
	public void addUser() {

	}

	@RequestMapping("/xt-add-role")
	public void addRole() {

	}
	
	@RequestMapping("/resource")
	public void resource() {

	}
}
